package fr.labri.buganalyzer.model;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

public class Issue implements Serializable{


	private static final long serialVersionUID = 1L;
	
	private long id;
	private int number;
	private Tracker tracker;
	private String type;
	private String summary;
	private String status;
	private String resolution;
	private String priority;
	private String severity;
	private Timestamp submittedOn;
	private Developer assignee;
	private Developer reporter;
	private Issue reltatedIssue;
	private String product;
	private String component;
	private String version;
	
	private Set<String> cc;
	private Set<Change> changes;
	private Set<Attachement> attachements;
	private Set<Comment> comments;

	public Issue() {
		this.changes = new HashSet<Change>();
		this.attachements= new HashSet<Attachement>();
		this.comments= new HashSet<Comment>();
		this.cc= new HashSet<String>();
	}

	public Issue(int number) {
		this();
		this.number = number;
	}

	public Issue(int id, Tracker tracker, String status, String priority) {
		this();
		this.number = id;
		this.tracker = tracker;
		this.status = status;
		this.priority = priority;
	}

	public String getStatus() {
		return status;
	}

	public String getPriority() {
		return priority;
	}

	public void setRelatedIssue(Issue issue) {
		this.reltatedIssue = issue;

	}

	public Issue getReletedIssue() {
		return reltatedIssue;
	}

	public void setAssignee(Developer dev) {
		this.assignee = dev;
	}

	public Developer getAssignee() {
		return this.assignee;
	}

	public void setTracker(Tracker tkr) {
		this.tracker = tkr;
	}

	public Tracker getTracker() {
		return this.tracker;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public Issue getReltatedIssue() {
		return reltatedIssue;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public void setReltatedIssue(Issue reltatedIssue) {
		this.reltatedIssue = reltatedIssue;
	}

	public String getSeverity() {
		return severity;
	}

	public void setPriority(String priority) {
		this.priority = priority;
	}

	public void setSeverity(String severity) {
		this.severity = severity;
	}

	public long getId() {
		return id;
	}

	public int getNumber() {
		return number;
	}

	public void setId(long id) {
		this.id = id;
	}

	public void setNumber(int num) {
		this.number = num;
	}

	public String getType() {
		return type;
	}


	public String getResolution() {
		return resolution;
	}

	public Timestamp getSubmittedOn() {
		return submittedOn;
	}

	public void setType(String type) {
		this.type = type;
	}

	public void setResolution(String resolution) {
		this.resolution = resolution;
	}

	public void setSubmittedOn(Timestamp submittedOn) {
		this.submittedOn = submittedOn;
	}

	public Developer getReporter() {
		return reporter;
	}

	public void setReporter(Developer reporter) {
		this.reporter = reporter;
	}

	public String getProduct() {
		return product;
	}

	public String getComponent() {
		return component;
	}

	public void setProduct(String product) {
		this.product = product;
	}

	public void setComponent(String component) {
		this.component = component;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Set<Change> getChanges() {
		return changes;
	}

	public Set<Attachement> getAttachements() {
		return attachements;
	}

	public Set<Comment> getComments() {
		return comments;
	}

	public void setChanges(Set<Change> changes) {
		this.changes = changes;
	}

	public void setAttachements(Set<Attachement> attachements) {
		this.attachements = attachements;
	}

	public void setComments(Set<Comment> comments) {
		this.comments = comments;
	}

	public Set<String> getCc() {
		return cc;
	}

	public void setCc(Set<String> cc) {
		this.cc = cc;
	}

}
